/* 
 * File:   ipd_median_filter.h
 * Author: dima
 *
 * Created on 24 января 2015 г., 17:01
 */

#ifndef IPD_MEDIAN_FILTER_H
#define	IPD_MEDIAN_FILTER_H
#include "ipd_img.h"
namespace ipd
{
class ipd_median_filter
{
public:
    ipd_median_filter(ipd_img &img,int w_mask,int h_mask);
    void convert_image(ipd_img &img);//convert Image
    virtual ~ipd_median_filter();
private:
    ipd_median_filter(const ipd_median_filter& orig);
    void create_mask();//create mask
    void delete_mask();//delete mask
    void fill_mask(int index_w, int index_h);//fill the mask
    void impose_mask(int index_w, int index_h,ipd_img &img);//impose a mask
    void sort_mask(int left, int right);//Sort mask
    int shift_width; 
    int shift_height; 
    int width_mask;//width mask
    int height_mask;//height mask
    int width_image;//width image
    int height_image;//height image
    color_model color_type;
    ipd_img &image;
    unsigned char *mask;// mask
};
}
#endif	/* IPD_MEDIAN_FILTER_H */
